package com.project.bean;

/**
 * @Author(王思翰)
 * @Description(类的描述)订单详情实体类
 * @Date(创建时间) 2021/7/31 14:54
 */
public class OrderDetailsBean {
    /**
     * id
     */
    private int id;
    /**
     * 所属订单
     */
    private OrderBean order;
    /**
     * 商品
     */
    private ProductBean product;
    /**
     * 商品数量
     */
    private int num;
    /**
     * 商品成交价
     */
    private int money;

    public OrderDetailsBean() {
    }

    public OrderDetailsBean(OrderBean order, int productId, int num,int money) {
        this.order = order;
        this.product = new ProductBean(productId);
        this.num = num;
        this.money=money;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public OrderBean getOrder() {
        return order;
    }

    public void setOrder(OrderBean order) {
        this.order = order;
    }

    public ProductBean getProduct() {
        return product;
    }

    public void setProduct(ProductBean product) {
        this.product = product;
    }

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }

    public OrderDetailsBean(int id) {
        this.id = id;
    }

    public int getMoney() {
        return money;
    }

    public void setMoney(int money) {
        this.money = money;
    }

    @Override
    public String toString() {
        return "OrderDetailsBean{" +
                "id=" + id +
                ", order=" + order +
                ", product=" + product +
                ", num=" + num +
                ", money=" + money +
                "}\n";
    }
}
